package com.openingedu.mba.persist;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "oc_question_option")
public class DbQuestionOption {
	
	@DatabaseField(generatedId = true)
	private Integer id;
	
	@DatabaseField()
	private Integer optionID;
	
	@DatabaseField(foreign = true, foreignAutoRefresh = true,columnName="questionID") 
	private DbQuestion question;
	
	@DatabaseField
	private String optionContent;
	
	@DatabaseField
	private Short optionCorrect;

	public DbQuestionOption() {
	}
	
	public Integer getOptionID() {
		return optionID;
	}

	public void setOptionID(Integer optionID) {
		this.optionID = optionID;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOptionContent() {
		return optionContent;
	}

	public void setOptionContent(String optionContent) {
		this.optionContent = optionContent;
	}

	public Short getOptionCorrect() {
		return optionCorrect;
	}

	public void setOptionCorrect(Short optionCorrect) {
		this.optionCorrect = optionCorrect;
	}

	public DbQuestion getQuestion() {
		return question;
	}

	public void setQuestion(DbQuestion question) {
		this.question = question;
	}

	@Override
	public String toString() {
		return "DbQuestionOption [id=" + id + ", question=" + question
				+ ", optionContent=" + optionContent + ", optionCorrect="
				+ optionCorrect + "]";
	}

}
